﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using Microsoft.EntityFrameworkCore;

namespace ConsoleApp1.DbCustom.Models
{
    [Index(nameof(UserId), Name = "Index_UserId")]
    public partial class Sys_User_RefreshToken
    {
        [Key]
        [StringLength(36)]
        [Unicode(false)]
        public string Id { get; set; } = null!;
        [StringLength(36)]
        [Unicode(false)]
        public string UserId { get; set; } = null!;
        [StringLength(300)]
        [Unicode(false)]
        public string Token { get; set; } = null!;
        [Column(TypeName = "datetime")]
        public DateTime ExpiredTime { get; set; }
        [StringLength(36)]
        [Unicode(false)]
        public string? CreatedBy { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? CreatedTime { get; set; }
        [StringLength(36)]
        [Unicode(false)]
        public string? LastModifiedBy { get; set; }
        [Column(TypeName = "datetime")]
        public DateTime? LastModifiedTime { get; set; }

        [ForeignKey(nameof(UserId))]
        [InverseProperty(nameof(Sys_User.Sys_User_RefreshToken))]
        public virtual Sys_User User { get; set; } = null!;
    }
}
